<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="css/default.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="js/jquery-1.4.3.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery.validate.js" ></script>
        <script type="text/javascript">
             $(function(){
                 $('#codigoest').autocomplete({
                     source : 'ajax-form.php',
                     select : function(event, ui){
                         $('#res').html(
                         '<h2>Resultado de la busqueda</h2>' +
                         '<strong>Codigo: </strong>' + ui.item.value +'<br/>'+
                         '<strong>Nombre completo: </strong>' + ui.item.nom_apell +'<br/>'+
                         '<strong>Email: </strong>' + ui.item.email
                     );
                     }
                 });
             });
         </script>
        <script type="text/javascript">
            $(document).ready(function() {
                $("#form-contacto").validate();
            });
        </script>
        <style type="text/css">
            #commentForm { width: 500px; }
            #commentForm label { width: 250px; }
            #commentForm label.error, #commentForm input.submit { margin-left: 253px; }
        </style>

        <title>Nuevo Estudiante</title>
    </head>
    <!--body-->
    <body>
        <div id="wrapper">
            <?php include 'include/header.php'; ?>
            <!-- end div#header -->
            <div id="page">
                <div id="content">
                    <div id="welcome">
                        <h1>Diligencie el formulario con los datos del estudiante</h1>
                         <p><img src="images/warning.png" width="30" height="30">  Antes de diligenciar el formulario verifique el codigo de el estudiante</p>
                        <div id="form-area">
                            <h2>Buscar estudiante</h2>
                                                        
                                    <dl>
                                        <dt><label for="codigoest">Escriba el codigo del estudiante</label></dt>
                                    
                                        <dd><input type="text" name="codigoest" id="codigoest" /></dd>
                                          
                                        <dd><p id="res"></p> </dd>
                                    </dl>
                           
                        </div>
                       
                        <div id="form-area">
                            <h2>Registrar un nuevo estudiante</h2>
                            <form action="include/guardar-form-est.php" method="post" id="form-contacto">
                                <fieldset>

                                    <dl>
                                        <dt><label for="codigo">Codigo *</label></dt>
                                        <dd><input type="text" name="codigo" id="codigo" class="digits required" minlength="10" maxlength="10"/></dd>

                                        <dt><label for="nombre">Nombre *</label></dt>
                                        <dd><input type="text" name="nombre" id="nombre" class="required" minlength="2"/></dd>

                                        <dt><label for="apellido">Apellido *</label></dt>
                                        <dd><input type="text" name="apellido" id="apellido" class="required" minlength="2" /></dd>

                                        <dt><label for="doc">Documento *</label></dt>
                                        <dd><input type="text" name="doc" id="doc" class="digits required required" minlength="8" maxlength="20"/></dd>

                                        <dt><label for="email">Email *</label></dt>
                                        <dd><input type="text" name="email" id="email" value="@" class="required email required" minlength="7"/></dd>

                                        <dt><label for="fijo">Telefono Fijo</label></dt>
                                        <dd><input type="text" name="fijo" id="fijo" class="digits" minlength="7" maxlength="7"/></dd>

                                        <dt><label for="movil">Telefono Movil</label></dt>
                                        <dd><input type="text" name="movil" id="movil" class="digits" minlength="10" maxlength="10"/></dd>

                                        <dt><label for="dir">Direccion *</label></dt>
                                        <dd><input type="text" name="dir" id="dir" class="required" minlength="15"/></dd>
                                  
                                        <dd><input type="hidden" name="estado" id="estado" value="1"/></dd>

                                        <dt><label for="semestre">Semestre *</label></dt>
                                        <dd><select name="semestre" id="semestre" class="required">
                                                <option value="" >Escoja una opcion</option>
                                                <option value="1">I</option><option value="2">II</option>
                                                <option value="3">III</option><option value="4">IV</option>
                                                <option value="5">V</option><option value="6">VI</option>
                                                <option value="7">VII</option><option value="8">VIII</option>
                                                <option value="9">IX</option><option value="10">Sin Semestre</option>
                                            </select>
                                        </dd>

                                        <dt class="center">
                                            <input type="submit" name="submit" id="submit" value="Enviar" />
                                            <br></br>
                                            <input type="reset" name="button" id="button" value="Reset" />
                                        </dt>
                                    </dl>
                            </form>
                            </fieldset>

                        </div>

                    </div>

                    <!-- end div#welcome -->

                </div>
                <!-- end div#content -->
                <div id="sidebar">
                    <ul>
                        <?php include 'include/nav.php'; ?>
                       
                        <!-- end navigation -->

                    </ul>
                </div>
                <!-- end div#sidebar -->
                <div style="clear: both; height: 1px"></div>
            </div>
            <?php include 'include/footer.php'; ?>
        </div>
        <!-- end div#wrapper -->
    </body>
    <!--body ends-->
</html>